<html>
<head><meta charset="utf-8"><title>upcoming design meeting on chalk-ty · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/upcoming.20design.20meeting.20on.20chalk-ty.html">upcoming design meeting on chalk-ty</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="189346849"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/upcoming%20design%20meeting%20on%20chalk-ty/near/189346849" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/upcoming.20design.20meeting.20on.20chalk-ty.html#189346849">(Feb 28 2020 at 20:16)</a>:</h4>
<p>Hey <span class="user-group-mention" data-user-group-id="692">@WG-traits</span> -- you may have noticed there is an upcoming design meeting about adopting the chalk-ty crate in rustc. I tried to sketch out a write-up of my thoughts and ideas <a href="https://hackmd.io/roRq0qHMQ6CyRJxj_FsPSQ" target="_blank" title="https://hackmd.io/roRq0qHMQ6CyRJxj_FsPSQ">in this hackmd</a> and I'd love feedback. This is both introducing the rough ideas of how chalk represents types (and why) and also sketching out  a plan to </p>
<ul>
<li>migrate rustc to have a similar API</li>
<li>extract a crate from rustc with few dependencies</li>
<li>make chalk depend on that crate</li>
</ul>
<p>Note that this is a bit different than what we've said before, which was to make rustc depend on chalk initially. I think we can actually do that <strong>too</strong> -- and just move the two things closer together until the different disappears. But I think that ultimately rustc is enough code that we have to migrate it bit by bit to be closer to chalk. (This migration bit is an interesting thing worth discussing more detail, I think.)</p>



<a name="189347611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/upcoming%20design%20meeting%20on%20chalk-ty/near/189347611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/upcoming.20design.20meeting.20on.20chalk-ty.html#189347611">(Feb 28 2020 at 20:27)</a>:</h4>
<p>In the proposed end-goal structure, why would the trait system be a separate library from the type library?</p>



<a name="189348623"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/upcoming%20design%20meeting%20on%20chalk-ty/near/189348623" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/upcoming.20design.20meeting.20on.20chalk-ty.html#189348623">(Feb 28 2020 at 20:39)</a>:</h4>
<p>Left some comments on the hackmd, but this seems like a good starting point for a discussion <span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span> (though these design meetings have a tendency to go in unexpected ways)</p>



<a name="189495158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/upcoming%20design%20meeting%20on%20chalk-ty/near/189495158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/upcoming.20design.20meeting.20on.20chalk-ty.html#189495158">(Mar 02 2020 at 14:26)</a>:</h4>
<p><span class="user-mention silent" data-user-id="125131">detrumi</span> <a href="#narrow/stream/144729-wg-traits/topic/upcoming.20design.20meeting.20on.20chalk-ty/near/189347611" title="#narrow/stream/144729-wg-traits/topic/upcoming.20design.20meeting.20on.20chalk-ty/near/189347611">said</a>:</p>
<blockquote>
<p>In the proposed end-goal structure, why would the trait system be a separate library from the type library?</p>
</blockquote>
<p>Good question. Two reasons I can think of:</p>



<a name="189495203"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/upcoming%20design%20meeting%20on%20chalk-ty/near/189495203" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/upcoming.20design.20meeting.20on.20chalk-ty.html#189495203">(Mar 02 2020 at 14:26)</a>:</h4>
<ul>
<li>it's a conceptually distinct component, and I think it's useful to use crates etc to help expose the interdependency structure</li>
</ul>



<a name="189495243"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/upcoming%20design%20meeting%20on%20chalk-ty/near/189495243" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/upcoming.20design.20meeting.20on.20chalk-ty.html#189495243">(Mar 02 2020 at 14:27)</a>:</h4>
<ul>
<li>it means that you can build other things, like type checkers or analyses, that use types but which don't directly depend on the trait system (e.g., they might just have a callback for "external queries" like "solve this trait goal")</li>
</ul>



<a name="189496557"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/upcoming%20design%20meeting%20on%20chalk-ty/near/189496557" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/upcoming.20design.20meeting.20on.20chalk-ty.html#189496557">(Mar 02 2020 at 14:40)</a>:</h4>
<p>In my mind the two are too closely linked, but if they can be separated then I agree that it would be good for the points you listed</p>



<a name="189506074"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/upcoming%20design%20meeting%20on%20chalk-ty/near/189506074" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/upcoming.20design.20meeting.20on.20chalk-ty.html#189506074">(Mar 02 2020 at 16:11)</a>:</h4>
<p>Well, they are separated in chalk today</p>



<a name="189506104"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/upcoming%20design%20meeting%20on%20chalk-ty/near/189506104" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/upcoming.20design.20meeting.20on.20chalk-ty.html#189506104">(Mar 02 2020 at 16:11)</a>:</h4>
<p>e.g., chalk-ir is the "type library"</p>



<a name="189506141"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/upcoming%20design%20meeting%20on%20chalk-ty/near/189506141" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/upcoming.20design.20meeting.20on.20chalk-ty.html#189506141">(Mar 02 2020 at 16:11)</a>:</h4>
<p>and chalk-solve / chalk-engine adds "trait solving" to that</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>